import java.io.File;
import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ZhongJinTao
 * Date: 2024-03-03
 * Time: 13:18
 */
public class IODemo2 {
    public static void main(String[] args) throws IOException {
        File f = new File("./test.txt");//绝对路径
        System.out.println(f.getAbsolutePath());//返回File对象的绝对路径
        System.out.println(f.getCanonicalPath());//返回File对象的修饰过的绝对路径
    }
}
